-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add datasource for AWS Lambda Layers #19081
feat: add datasource for AWS Lambda Layers #19081
Conversation
Co-authored-by: HonkingGoose <[email protected]>
…ed-arn-datasource
@HonkingGoose Thanks for your review. I committed your change. I still have two questions which I can't answer. How does Renovate know what to put into the Could you please clarify? locals {
# renovate: datasource=aws-versioned-arn architecture=x86_64 runtime=python37
insight_layer_arn = "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:21"
}
resource "aws_lambda_function" "example" {
# ... other configuration ...
layers = [local.insight_layer_arn]
} {
"regexManagers": [
{
"fileMatch": ["\\.tf$"],
"matchStrings": [
".*renovate: datasource=aws-versioned-arn architecture=(?<architecture>.*) runtime=(?<runtime>.*)\\s+.* = \"(?<depName>.*):(?<currentValue>\\d+)\""
],
"versioningTemplate": "loose"
}
]
} async getReleases({
packageName: serializedArnFilter,
}: GetReleasesConfig): Promise<ReleaseResult | null> {
const lambdaLayerVersions = await this.getSortedLambdaLayerVersions(
serializedArnFilter
);
} |
I'll let the maintainers answer your questions. 😉 |
@JamieMagee Could you step in please? |
…apag-Lloyd/renovate into kayma/add-aws-versioned-arn-datasource
@viceice I am almost satisfied with the results here. The only problem I have is, that Renovate tries to update the dependency name as well. Let's say the newest version of my lambda is 3 and I have the following file: locals {
# renovate: datasource=aws-lambda-layer filter={"name": "my-layer", "architecture": "x86_64", "runtime": "python3.7"}
my_layer_arn = "arn:aws:lambda:us-east-1:223456789022:layer:my-layer:1"
} After Renovate ran on my repository, I see the following change: I tried to find some docs explaining the logic here, but didn't found any. Could you shed some light on this, please? |
What's your renovate config for that upgrade? It looks like it's finding it somewhere in |
I am developing with VSCode using the devcontainer option. I followed the steps in the local_development and exported my AWS credentials and the Renovate token. No other special configuration set. I started renovate with |
Not to derail the current design according to the readme using a specific local variable, but it may be good to support the aws provider's data source aws_lambda_layer_version. data "aws_lambda_layer_version" "datadog_extension" {
layer_name = "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Extension"
version = 37
} By specifying |
Changes
This PR adds a new datasource to update the versioned layer arns for AWS Lambda Layers.
Context
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: